home *** CD-ROM | disk | FTP | other *** search
/ The X-Philes (2nd Revision) / The X-Philes Number 1 (1995).iso / xphiles / hp48hor1 / hackit.doc < prev    next >
Text File  |  1995-03-31  |  28KB  |  519 lines

  1. (Comp.sys.handhelds) 
  2. Item: 3567 by ftg0673 at tamsun.TAMU.EDU 
  3. Author: [Rick Grevelle] 
  4.   Subj: HP48 HACKIT, version 4 (BYTES: #F675h, 2712) 
  5.   Date: Tue Jun 25 1991 
  6.  
  7. [Note: This "HACKIT" Library is truly a 48 hacker's dream come true.  It was 
  8. developed by Rick Grevelle over a long period of time.  The following 
  9. documentation was pieced together as best I could from snippits that were 
  10. attached to each posted revision.  Its COPY function is not documented, which 
  11. is just as well, because only true hackers should have access to its power, and 
  12. only they will be patient enough to use the tools herein to figure out what it 
  13. does and how to use it.  It's worth it!  Many thanx to Rick for this excellent 
  14. library.  Every "real programmer" will keep this permanently in a port.  -jkh-] 
  15.  
  16.  
  17. This is an enhanced version of the HACKIT thing.  It includes several new 
  18. features which further facilitate hacking in the 48, and are as follows: 
  19.  
  20.         o   Multifunctional PEEK will now allow the normally hidden 
  21.             32k of ROM to be peeked.  When flag 14 is clear the 32k 
  22.             of memory between #70000h and #7FFFFh is RAM.  When the 
  23.             flag is set this is shifted to #F0000h through #FFFFFh, 
  24.             and #70000h through #7FFFFh becomes what was previously 
  25.             covered by RAM; this configuration is identical to that 
  26.             of the built in memory scanner. 
  27.  
  28.         o   Bank switching capabilities have also been incorporated 
  29.             in the SEEK scheme, functioning exactly as described in 
  30.             the PEEK routine. 
  31.  
  32.         o   DIR-> is a new addition to the OUT-> command; it allows 
  33.             a directory in level 1 to be decomposed on the stack in 
  34.             to its constituent parts.  Due to this change, it's not 
  35.             necessary to include the RCLDR scheme in the library as 
  36.             it was added to the original HACKIT post only after all 
  37.             first attempts to produce a successful DIR-> had failed. 
  38.  
  39.         o   Flag 15 affects the way in which the ->ASCI, and  
  40.             ASCI-> routines handle code objects.  Currently a ->STR, 
  41.             and STR-> scheme is being conceived that will provide a 
  42.             superior editing scheme for queer objects. 
  43.  
  44.  
  45. At the risk of being reiterative, I'm including an improved version of the 
  46. documentation which appeared in the original posting of this library.  It 
  47. should be a bit more articulate, and contain examples for those whose time 
  48. is allowing.  Much work still remains to be done regarding the completely 
  49. bullet proof hacking library, but since all the fun seems to be in getting 
  50. there, hopefully it will take a long time. 
  51.  
  52. A final word of caution; do *not* attempt to implement a bank shift using 
  53. either PEEK, or SEEK, if this library is stored in port 0, or anywhere in 
  54. the address space being displaced.  This means both of the 32k banks that 
  55. are affected by setting flag 14 are off limits, as far as this feature is 
  56. concerned, for the storing of this library.  Should there be any question 
  57. about this, or anything else, feel free to call, or write, and I shall be 
  58. glad to provide any answers of which I might be capable :-). 
  59.  
  60.  
  61. Rick Grevelle 
  62. (409) 774-1169 
  63. ftg0673@tamsun.tamu.edu 
  64.  
  65.                                    HACKIT 
  66.  
  67. ============================================================================== 
  68.  
  69.  
  70. HACKIT is a library of utilities designed to facilitate hacking in the HP48SX. 
  71. The fourteen programs it contains were conceived for two fundamental purposes: 
  72.  
  73.  o   Exploration, documentation, and accessing of the machine code, and RPL 
  74.      operating system contained in the 48's vast ROM. 
  75.  
  76.  o   Construction, and manipulation of the various object types not supported 
  77.      by the 48's editor, user language commands, functions, or operations. 
  78.  
  79.  
  80.  
  81.                                    ->ASCI 
  82.  
  83. This is a generalized binary-to-ascii conversion scheme that returns a string 
  84. of hexadecimal characters which are the equivalent internal representation of 
  85. the argument.  When USER FLAG 15 is set both the prolog and the length of code 
  86. objects are truncated meaning that the result string contains in-line machine 
  87. code only.  When this flag is clear, which is the default, truncation does not 
  88. occur.  All other object types are unaffected by the flag setting. 
  89.  
  90.                                    ASCI-> 
  91.  
  92. Reversing the result of the previous routine is made possible with this scheme, 
  93. which converts ascii-to-binary, taking as its argument a string of hexadecimal 
  94. characters.  When USER FLAG 15 is set all strings are treated as in-line machine 
  95. code, whereby a code object would be the result.  When flag 15 is clear one of 
  96. two things happens depending on the string argument itself, and is explained in 
  97. the following summary. 
  98.  
  99.  
  100.  
  101.                                IMPORTANT POINTS 
  102.  
  103.  o   The above routines were intended to provide a means for *toggling* stack 
  104.      objects back between their internal string representation and immediately 
  105.      executable form, which means ROM objects must be dealt with differently. 
  106.      An important attribute associated with these two schemes is their ability 
  107.      to differentiate between ROM and RAM objects. 
  108.  
  109.  o   When an argument taken by the ->ASCI routine is a ROM object, a character 
  110.      string representing the five nibble address where that object is located 
  111.      in ROM is returned.  Strings containing only five characters that are used 
  112.      as arguments for ASCI-> are treated as pointers; solitary prologs are not 
  113.      permitted though (i.e. "D9D20", "C2A20", "11920").  Future versions should 
  114.      be more than capable of dealing with such complexities as this. 
  115.  
  116.  o   Spaces and newline carriage returns are allowed in strings that are to be 
  117.      converted by ASCI->.  This helps to alleviate some of the confusion when 
  118.      looking at long strings of hexadecimal characters in that spaces can now 
  119.      be used to separate groups of characters, and newline carriage returns to 
  120.      segment the string into several lines when editing.  [Comments are also 
  121.      deleted; see note below.  -jkh-] 
  122.  
  123.  o   Any object encoded using ->ASC can be unencoded using ASCI->.  There's no 
  124.      longer a need for these silly schemes to delete newline carriage returns, 
  125.      or calculate a new checksum to tack onto an ->ASC encoded object that has 
  126.      been altered in order to get ASC-> to work.  ->ASC, and ASC-> were written 
  127.      to provide a safe means of transferring data, and not for hacking.  It is 
  128.      therefore not recommended to use these two schemes in place of ->ASC, and 
  129.      ASC->. 
  130.  
  131.  o   ASCI-> performs equally well on strings of odd number lengths because the 
  132.      RPL segments of the program correctly utilize the block allocate routine 
  133.      at #61C1Ch.  But because of its very nature, it's still quite possible to 
  134.      suffer a memory loss from abusing this routine; so be careful. 
  135.  
  136.  
  137.  
  138.       Example:  Construct the DUP command from its ASCII string representation. 
  139.  
  140.  
  141.         úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿               úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ 
  142.         3{HOME}                 3               3{HOME}                 3 
  143.         ~AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ'               ~AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ' 
  144.         34:                     3               34:                     3 
  145.         33:                     3               33:                     3 
  146.         32:                     3               32:                     3 
  147.         31:              "78BF1"3               31:                  DUP3 
  148.         3### ### ### ### ### ###3               3### ### ### ### ### ###3 
  149.         àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù               àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù 
  150.       1) Enter the string "78DF1".            2) Implement ASCI-> to obtain 
  151.                                                  the command DUP. 
  152.  
  153.  
  154. Note:   New Version of HP48 HACKIT: ASCI-> Accepts Strings With Comments 
  155.  
  156. This new version of the HACKIT library takes a significant step forward. 
  157. Now, when preparing strings of hex nibbles for use with ASCI-> (to build the 
  158. various types of HP48 ob- jects), one may include comments in a manner similar 
  159. to those in regular HP48 program objects.  Strings of nibbles containing not 
  160. only spaces and carriage returns but also embedded comments which fall between 
  161. a leading "@" symbol and a line-terminating carriage return are now handled 
  162. like strings containing only nibble characters 0 through F.  For example, a 
  163. simple RPL object to contain the ROM number 1 can be represented by the the 
  164. string "D9D209C2A2B2130".  (The string "9C2A2" by itself would also suffice, 
  165. but we are including the "begin RPL" and "end marker" addresses here to simply 
  166. embellish the example.) Passing "D9D209C2A2B2130" as an argument to ASCI-> will 
  167. yield a 1.  In addition, this version of ASCI-> will also accept a string like 
  168. the following: 
  169.  
  170. "D9D20 @ Begin RPL 
  171.  9C2A2 @ 1 
  172.  B2130 @ End Marker" 
  173.  
  174. This means that system RPL code developed on PC screens may be commented, 
  175. with the source code available directly for HACKIT. It also means that  
  176. HACKIT can accept input virtually identical to the output of Voyager (if the 
  177. "@" signs are added to each commented line).  Now, HP's PDL becomes a valid 
  178. development platform for system RPL code. 
  179.  
  180.  
  181.                                    SCRC 
  182.  
  183. Calculates the checksum of a string of hexadecimal characters as if they were 
  184. in immediately executable form.  So objects which have been converted to their 
  185. internal hexadecimal character string form (ASCII) using ->ASCI will have the 
  186. same checksum when SCRC is used on the ASCII string, as they would have had in 
  187. their binary form using the BYTES command.  This allows queer objects such as 
  188. libraries and backups that contain checksums which do not include the complete 
  189. data structure to be altered, or even constructed from scratch, in the 48.  So 
  190. for an example a trivial backup object will be built utilizing SCRC, ->ASCI, 
  191. and the ASCI-> routines. 
  192.  
  193.  
  194.  
  195.       Example:  Build a backup object named "Hex" containing the 
  196. hexadecimal 
  197.                 integer, # 123456789ABCDEF0h. 
  198.  
  199.  
  200.                 o  Construct the backup object's appropriate name. 
  201.  
  202.         úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿               úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ 
  203.         3{HOME}                 3               3{HOME}                 3 
  204.         ~AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ'               ~AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ' 
  205.         34:                     3               34:                     3 
  206.         33:                     3               33:                     3 
  207.         32:                     3               32:                     3 
  208.         31:                'Hex'3               31:      "84E2030845687"3 
  209.         3### ### ### ### ### ###3               3### ### ### ### ### ###3 
  210.         àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù               àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù 
  211.       1) Enter the name 'Hex'.                2) Implement ->ASCI on the 
  212.                                                  name. 
  213.  
  214.         úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿               úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ 
  215.         3{HOME}                 3               3{HOME}                 3 
  216.         ~AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ'               ~AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ' 
  217.         34:                     3               34:                     3 
  218.         33:                     3               33:                     3 
  219.         32:                     3               32:                     3 
  220.         31:           "30845687"3               31:         "3084568730"3 
  221.         3### ### ### ### ### ###3               3### ### ### ### ### ###3 
  222.         àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù               àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù 
  223.       3) Edit the string to delete            4) Concatenate "30" by using 
  224.          the first five characters.              the plus (+) key. 
  225.  
  226.  
  227.  
  228.                 o  Prepare the backup object's contents for concatenation. 
  229.  
  230.         úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿               úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ 
  231.         3{HOME}                 3               3{HOME}                 3 
  232.         ~AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ'               ~AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ' 
  233.         34:                     3               34:                     3 
  234.         33:                     3               33:                     3 
  235.         32:         "3084568730"3               32:         "3084568730"3 
  236.         31:  # 123456789ABCDEF0h3               31: "E4A20510000FEDCBA..3 
  237.         3### ### ### ### ### ###3               3### ### ### ### ### ###3 
  238.         àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù               àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù 
  239.       1) Enter the integer data.              2) Implement ->ASCI once again. 
  240.  
  241.  
  242.  
  243.                 o  Make final preparations for checksumming. 
  244.  
  245.         úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿               úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ 
  246.         3{HOME}                 3               3{HOME}                 3 
  247.         ~AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ'               ~AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ' 
  248.         34:                     3               34:                     3 
  249.         33:                     3               33:                     3 
  250.         32:                     3               32: "3084568730E3A2051..3 
  251.         31: "3084568730E4A2051..3               31:              "33000"3 
  252.         3### ### ### ### ### ###3               3### ### ### ### ### ###3 
  253.         àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù               àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù 
  254.       1) Concatenate the previous             2) DUP the result string, and 
  255.          two result strings using                use SIZE to obtain its size. 
  256.          the plus (+) key again.                 Add 10 to the size, convert 
  257.                                                  the result to a hexadecimal 
  258.                                                  number, and enter backwards 
  259.                                                  as a five character string. 
  260.  
  261.         úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿               úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ 
  262.         3{HOME}                 3               3{HOME}                 3 
  263.         ~AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ'               ~AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ' 
  264.         34:                     3               34:                     3 
  265.         33:                     3               33:                     3 
  266.         32:                     3               32: "330003084568730E4..3 
  267.         31: "330003084568730E4..3               31:             "119200"3 
  268.         3### ### ### ### ### ###3               3### ### ### ### ### ###3 
  269.         àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù               àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù 
  270.       3) Perform a SWAP, and using            4) Append the string "119200" 
  271.          the plus (+) key, prepend               to the end of the string, 
  272.          the length onto the front               DUP the result, and using 
  273.          of the string.                          SCRC calculate the object's 
  274.                                                  proper checksum. 
  275.  
  276.  
  277.  
  278.                 o  Make final preparations for coverting the string. 
  279.  
  280.         úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿               úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ 
  281.         3{HOME}                 3               3{HOME}                 3 
  282.         ~AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ'               ~AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ' 
  283.         34:                     3               34:                     3 
  284.         33:                     3               33:                     3 
  285.         32: "330003084568730E4..3               32:              "26B20"3 
  286.         31:               "0B41"3               31: "330003084568730E4..3 
  287.         3### ### ### ### ### ###3               3### ### ### ### ### ###3 
  288.         àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù               àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù 
  289.       1) Enter the four hexadecimal           2) Enter the prolog for the 
  290.          characters of the checksum              backup object backwards, 
  291.          backwards in a string, and              and perform another SWAP. 
  292.          append this to the string 
  293.          for which the checksum was 
  294.          calculated. 
  295.  
  296.  
  297.         úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿               úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ 
  298.         3{HOME}                 3               3{HOME}                 3 
  299.         ~AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ'               ~AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ' 
  300.         34:                     3               34:                     3 
  301.         33:                     3               33:                     3 
  302.         32:                     3               32:                     3 
  303.         31: "26B20330003084568..3               31:           Backup Hex3 
  304.         3### ### ### ### ### ###3               3### ### ### ### ### ###3 
  305.         àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù               àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù 
  306.       3) Prepend the prolog using             4) Convert the string using 
  307.          the plus (+) key one last               ASCI-> to its binary form. 
  308.          time. 
  309.  
  310.  
  311.  
  312.                                    SEEK 
  313.  
  314. Appearing first in his Processor Notes, SEEK is in fact a modified version of 
  315. Alonzo Gariepy's FIND routine.  SEEK was specifically modified to run in the  
  316. 48; it's one third the size of the original version for the 28, and should run 
  317. a bit quicker too. 
  318.  
  319. Alonzo's predominately register, rather than memory oriented algorithm remains 
  320. unchanged.  Recall the overall increase in speed was only about 10% over that  
  321. of the brute force approach, which he attributed to an increased time spent in 
  322. the looping structures.  Because it demonstrates several programming features 
  323. specific to the 48, I've taken the liberty of renaming the routine. 
  324.  
  325. The way to use this program is to specify a memory pattern and a place to start 
  326. looking.  A memory pattern can be sequence of up to fifteen nibbles, and a one 
  327. nibble length (the number of nibbles in the pattern minus one).  An application 
  328. for SEEK could be to locate the occurrences of the instruction 808C in memory. 
  329. To do this enter # C8083h in level two, and a starting place such as # 0h.  All 
  330. that remains to be done is to implement SEEK, and to continue doing so to find 
  331. any subsequent instances.  This is because the result returned will be a binary 
  332. integer which is the address one higher than where the pattern exist in memory. 
  333.  
  334.  
  335.  
  336.                                IMPORTANT POINTS 
  337.  
  338.  o   Bank shifting capabilities have been incorporated into SEEK, allowing the 
  339.      normally hidden 32k bank of ROM to be searched.  With USER FLAG 14 clear, 
  340.      the 32 kilobytes of memory between #70000h, and #7FFFFh, is RAM.  Setting 
  341.      flag 14 shifts the RAM to #F0000h through #FFFFFh, and reconfigures what 
  342.      was previously hidden ROM in its place. 
  343.  
  344.  o   This version does not stop until it finds an instance, or scans the entire 
  345.      address space.  So even though the routine is fast, due to the size of the 
  346.      48's address space, matching certain patterns could take several seconds. 
  347.  
  348.  
  349.  
  350.       Example:  Determine the first occurrence of the ARRAY prolog, # 029E8h, 
  351.                 in the normally hidden 32k bank of ROM. (flag 14 set) 
  352.  
  353.  
  354.         úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿               úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ 
  355.         3{HOME}                 3               3{HOME}                 3 
  356.         ~AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ'               ~AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ' 
  357.         34:                     3               34:                     3 
  358.         33:                     3               33:                     3 
  359.         32:             # 29E84h3               32:             # 29E84h3 
  360.         31:             # 70000h3               31:             # 72001h3 
  361.         3### ### ### ### ### ###3               3### ### ### ### ### ###3 
  362.         àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù               àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù 
  363.       1) Enter the bit pattern with           2) The result returned is the 
  364.          the number of nibbles minus             one higher than where the 
  365.          one, and the address where              actual pattern was found. 
  366.          to begin searching. 
  367.  
  368.                                    PEEK 
  369.  
  370. Speed is still an essential attribute of this dual functioning PEEK.  Only the 
  371. variable length version will slow slightly when large result strings hundreds 
  372. of characters long are returned.  The routine is smart enough to know which of 
  373. the PEEKs to implement based on the arguments it's given.  When string results 
  374. are preferred, level two should contain a binary integer that's the address to 
  375. be peeked, while level one should be a real number representing the length of 
  376. the result string.  The bank shifting features as described in SEEK scheme are 
  377. also available in this version of PEEK; an example follows. 
  378.  
  379.  
  380.  
  381.       Example:  Using PEEK and ASCI->, recover the message array from the 
  382.                 hidden ROM found in the previous example. (flag 14 set) 
  383.  
  384.  
  385.         úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿               úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ 
  386.         3{HOME}                 3               3{HOME}                 3 
  387.         ~AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ'               ~AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ' 
  388.         34:                     3               34:                     3 
  389.         33:             # 29E84h3               33:                     3 
  390.         32:             # 72000h3               32:             # 29E84h3 
  391.         31:                  6413               31:      Array of String3 
  392.         3### ### ### ### ### ###3               3### ### ### ### ### ###3 
  393.         àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù               àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù 
  394.       1) Subtract one from the above          2) Now implement ASCI-> on the 
  395.          result, enter the number of             result to obtain the ARRAY. 
  396.          nibbles to be returned, and 
  397.          implement PEEK.                  
  398.  
  399.  
  400.                                    POKE 
  401.  
  402. Complimenting PEEK is this dual functioning variable length POKE scheme which 
  403. will accept either a string of hexadecimal characters, or a binary integer for 
  404. the level two argument that represents the data to be poked.  Level one should 
  405. be a binary integer that is the address to poke.  It is important to note that 
  406. when the level two argument is a binary integer, the wordsize of that specific 
  407. integer will be used to determine the number of nibbles to poke, and isn't in 
  408. any way dependent upon the current wordsize returned by RCWS. 
  409.  
  410.  
  411.  
  412.                                    OUT-> 
  413.  
  414. Multifunctioning OUT-> encompasses several of the object types on which OBJ-> 
  415. will not work.  In addition, and analogous to the LIST-> command, ALG-> and 
  416. PRG-> are intended to function on algebraics, and programs.  ARR-> functions 
  417. identically to ARRY->, but works on all the various array types such as the 
  418. array of string, algebraic, list, etc.  DIR-> decomposes a directory that is 
  419. in level one into its constituent parts.  XLIB-> has also been included; it 
  420. decomposes visible, and hidden XLIBs into their library and command numbers.   
  421.  
  422.  
  423.  
  424.       Example:  Decompose the Array of String obtained in previous example 
  425.                 into its constituent parts. 
  426.  
  427.         úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿               úÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ¿ 
  428.         3{HOME}                 3               3{HOME}                 3 
  429.         ~AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ'               ~AÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄ' 
  430.         34:                     3               34: "Try To Recover Me..3 
  431.         33:                     3               33: "Replace RAM, Pres..3 
  432.         32:             # 29E84h3               32: "No Mem To Config ..3 
  433.         31:      Array of String3               31:               { 16 }3 
  434.         3### ### ### ### ### ###3               3### ### ### ### ### ###3 
  435.         àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù               àÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄÄù 
  436.       1) Using the array obtained             2) Recompose the array again 
  437.          in the previous example,                by using the ->ARR routine. 
  438.          implementing OUT-> will                 The result will look like 
  439.          reveal the strings.                     that of frame 1). 
  440.  
  441.  
  442.                                    ->ALG 
  443.  
  444. Be careful with this one; the stack arguments must be in strict RPN order.  As 
  445. before, ->ALG is analogous to ->LIST, only the result is an algebraic, rather 
  446. than a list. 
  447.  
  448.  
  449.                                    ->ARR 
  450.  
  451. This is my version of ->ARRY; it will build an array of any kind providing all 
  452. stack arguments are of the same type. (i.e. strings, reals, algebraics, etc.) 
  453. It functions identically to ->ARRY, except that real and complex numbers can't 
  454. be mixed.  Level one can be either a real number, a list containing a real, or 
  455. a list containing two reals that is the size the resulting array is to be. 
  456.  
  457.  
  458.                                    ->DIR 
  459.  
  460. Builds a directory from the stack on the stack.  Level one must contain a real 
  461. which is the total number of variables that the directory is to contain, level 
  462. two a global name, and level three the contents of that global name.  Because 
  463. the entire process utilizes dynamic RAM, it is relatively fast for moderately 
  464. sized directories, but slows substantially on very large ones.  Using both the 
  465. DIR-> feature found in the OUT-> command along with this routine, a directory 
  466. on the stack can be effectively toggled between its constituent parts, and its 
  467. composite form. 
  468.  
  469.  
  470.                                    ->PRG 
  471.  
  472. Functions identically to ->LIST, only the result is a program, and not a list. 
  473.  
  474.  
  475.                                    ->XLIB 
  476.  
  477. Builds an XLIB from two stack arguments.  Level two can be either a real number 
  478. or a binary integer that's the number of the library to which the XLIB belongs. 
  479. Level one must be the same argument type as level two and should be the command 
  480. number of the desired XLIB.   
  481.  
  482.                                    ADDR 
  483.  
  484. Returns the address where the following stack arguments are located in memory: 
  485. any ROM object, any XLIB belonging to a library stored in a port, any TAGGED 
  486. that's either a BACKUP object or a LIBRARY stored a port.  One final attribute 
  487. associated with ADDR that merits mentioning, regards those XLIBs that belong 
  488. to the three intrinsic ROM libraries with a link table.  This routine can just 
  489. as easily locate these address, as it can those in port memory.  Even if the 
  490. memory location happens to be that of the hidden ROM, ADDR will determine its 
  491. address. 
  492.  
  493.   
  494.  
  495.                                    RCLIB 
  496.  
  497. This multifunctional routine is to a library what RCL is to a directory.  RCLIB 
  498. will recall a library as a fully operational directory.  All that is necessary 
  499. to do is to put either the library's name or (real) number in level one.  Again 
  500. this is slowed greatly on very large libraries.  RCLIB will work on any library 
  501. including ROM (i.e. 2, 240, 1792).  Finally, the contents of any library's XLIB 
  502. can be recalled to the stack; simply put the appropriate XLIB in level one, and 
  503. the result will be comparable to using RCL on variable stored in a directory. 
  504.  
  505. ---------- 
  506.  
  507. A final word of caution; do *not* attempt to implement a bank shift using 
  508. either PEEK, or SEEK, if this library is stored in port 0, or anywhere in 
  509. the address space being displaced.  This means both of the 32k banks that 
  510. are affected by setting flag 14 are off limits, as far as this feature is 
  511. concerned, for the storing of this library.  Should there be any question 
  512. about this, or anything else, feel free to call, or write, and I shall be 
  513. glad to provide any answers of which I might be capable :-). 
  514.  
  515.  
  516. Rick Grevelle 
  517. (409) 774-1169 
  518. ftg0673@tamsun.tamu.edu 
  519.